﻿@model GridView<JCTimes.DomainModel.Views.V_PDALog>
@{
    int seq = (Model.PagedList.PageIndex - 1) * Model.PagedList.PageSize;
}
<table class="table">
    <tr>
        <th style="width: 6%">
            序号
        </th>
        <th style="width: 12%">
            PDA编号
        </th>
        <th style="width: 20%">
            接口名称
        </th>
        <th style="width: 15%">
            日志内容
        </th>
        <th style="width: 10%">
            是否合法
        </th>
        <th style="width: 15%">
            创建日期
        </th>
    </tr>
    @foreach (var item in Model.PagedList)
    {
        <tr>
            <td style="text-align: center">
                @((++seq).ToString())
            </td>
            <td>
                @*@Html.DisplayFor(modelItem => item.PDANo)*@
                @(item.PDANo + "" == "" ? item.LogContent : item.PDANo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PortName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LogContent)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ConnectFlag)
            </td>
            <td>
                @(item.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss"))
            </td>
        </tr>
    }
</table>
<div>
    @if (Model.PagedList.PageCount > 1) {
        <div class="pager">
            <p>
                共有<span class="orange">@Model.PagedList.TotalCount</span> 条记录 共<span class="orange">@Model.PagedList.PageCount</span>页
            </p>
            @Ajax.PageLinks(Model.PagedList.PageCount, Model.PagedList.PageIndex, i => Url.Action("Grid", new { pageIndex = i, searcher = Model.Searcher }),
                         new AjaxOptions { UpdateTargetId = "gridview", HttpMethod = "Post", LoadingElementId = "loading" })
        </div> 
        
        
    }
</div>

